//
//  XDXSocket.h
//  location
//
//  Created by Dongxiang Xu on 2024/9/8.
//

#import <Foundation/Foundation.h>
typedef void(^ XDXSocketReceiveBlock)(NSDictionary *message);
typedef void(^ XDXSocketOpenBlock)(BOOL isOpen);

@interface XDXSocket : NSObject

@property (nonatomic,copy) XDXSocketReceiveBlock XDXSocketReceiveBlock;
@property (nonatomic,copy) XDXSocketOpenBlock XDXSocketOpenBlock;
@property (nonatomic,strong) NSString *userId;
@property (nonatomic,strong) NSString *groupId;
@property (nonatomic,assign) BOOL canSend;
+ (instancetype)shareInstance;
- (void)connect;
- (void)close;
- (void)sendMessage:(NSObject *)message;


@end
